Condition of parallelism and perpendicularity of lines in terms of their slopes